/*
   @Copyright:LeetCode
   @Author:   tjyemail
   @Problem:  http://leetcode.com/problems/contains-duplicate
   @Language: C++
   @Datetime: 20-01-09 10:52
   */

class Solution {
public:
	bool containsDuplicate(vector<int>& nums) {
		unordered_set<int> dict;
		for(int i=0; i<nums.size(); dict.insert(nums[i++]))
			if (dict.count(nums[i])) return true;
		return false;
	}
};
